package com.heisen.uua.service;

import com.heisen.uua.exception.ValidateCodeException;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author sen
 * @description
 * @date 2023/12/26 16:18
 */

public interface ValidateCodeService {

    /**
     *  创建验证码
     * @param request
     * @param response
     */
    void create(HttpServletRequest request, HttpServletResponse response);

    /**
     * 效验验证码
     * @param key
     * @param code
     * @throws ValidateCodeException
     */
    void check(String key, String code) throws ValidateCodeException;
}
